GtkFlowBox: Set orientable style classes initially
authorMatthias Clasen <mclasen@redhat.com>
Fri, 18 Jul 2014 23:38:16 +0000 (19:38 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 18 Jul 2014 23:38:16 +0000 (19:38 -0400)
This was an omission, horizontal/vertical would only be set
when the orientation is changed.

gtk/gtkflowbox.c

index 84c837bdad584de4efc68dcf8f96d70eb16af132..d0dd345767f148bb5752fc7b203f5d78b5267399 100644 (file)
@@ -3558,6 +3558,7 @@ gtk_flow_box_set_property (GObject      *object,
       if (priv->orientation != g_value_get_enum (value))
         {
           priv->orientation = g_value_get_enum (value);
+          _gtk_orientable_set_style_classes (GTK_ORIENTABLE (box));
           /* Re-box the children in the new orientation */
           gtk_widget_queue_resize (GTK_WIDGET (box));
           g_object_notify_by_pspec (object, pspec);
@@ -3954,6 +3955,8 @@ gtk_flow_box_init (GtkFlowBox *box)
   priv->row_spacing = 0;
   priv->activate_on_single_click = TRUE;
 
+  _gtk_orientable_set_style_classes (GTK_ORIENTABLE (box));
+
   priv->children = g_sequence_new (NULL);
 
   priv->multipress_gesture = gtk_gesture_multi_press_new (GTK_WIDGET (box));